import axios from '@/util/axios';

const actions = {

    /**
     * 获取未完成订单数
     * @param store Vuex Instance
     */
    async getAllTips(store: any) {
        let res = await axios.get('orders/order/getPendingOrderCount')
        store.commit('setAllTips', res.data)
    },

    /**
     * 获取消息通知
     * @param store Vuex Instance
     */
    async getMessageNumber (store: any) {
        let res = await axios.get('notis/notification/statistics')
        store.commit('setMessageNumber', res.data)
    },
    // 获取系统时间
    async getSysTime (store: any) {
        let res = await axios.get('tools/systemTime')
        store.commit('setSysTime', res.data)
    }
}
export default actions